juce
namespace (UZI heavily relies on namespaces to avoid name clashing)include
and src
subfolder of the repositoryjuce::BrowserContent browserContent;
include/GUI/components/BrowserContent.hpp
in the MyComponent.hpp header file
browserContent = new BrowserContent(JUCE_T("../path/to/file.htm"); addAndMakeVisible(browserContent);
int width = getWidth(); int height = getHeight(); // Simple child component resizing browserContent->setSize(width, height); // Just make sure the renderer can fit the renderer data, if not, grow us a little bit // You might simply not need this, so remove the 2 lines below if (height = browserContent->requiredHeightAfterRendering() > getHeight()) setSize(width, height);
src/GUI/components/BrowserComponent.cpp
for an implementation with viewportssrc/GUI/components/BrowserContent.cpp
for an example implementation.